<template>
  <div class="user">
    <el-dropdown>
      <span class="el-dropdown-link">
        <el-avatar
          src="https://cdn3.axureshop.com/demo/1634752/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u5348.svg"
        />
        Sam
        <el-icon class="el-icon--right">
          <arrow-down />
        </el-icon>
      </span>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item>修改密码</el-dropdown-item>
          <el-dropdown-item>退出</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>

<script lang="ts" setup>
import { ArrowDown } from '@element-plus/icons-vue'
</script>

<style lang="less" scoped>
.user {
  display: flex;
  justify-content: flex-end;
  margin-right: 10px;
  height: 64px;
  align-items: center;
  .el-dropdown-link {
    display: flex;
    align-items: center;
  }
  .el-avatar {
    margin-right: 10px;
  }
}
</style>
